//
//  SFSegmentViewController.h
//  Yanwei
//
//  Created by 刘文 on 16/9/28.
//  Copyright © 2015年 ouer. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SFSegmentControl.h"
#import "DeepestViewController.h"

typedef NS_ENUM(NSInteger, ControllerShowType) {
    ControllerShowTypeNoraml = 0,
    ControllerShowTypeFullScreen,
    ControllerShowTypeShowNavigation
};

typedef void(^SegmentControlSelectedIndex)(NSInteger);

@interface SFSegmentViewController : DeepestViewController

@property(nonatomic, strong, readonly) SFSegmentControl   *segmentControl;
@property(nonatomic, strong, readonly) UIScrollView       *scrollView;

//  segment properties
@property(nonatomic)            SFSegmentType   segmentType;
@property(nonatomic, strong)    UIImage         *segmentBackgroundImage;
@property(nonatomic, strong)    UIColor         *segmentBackgroundColor;
@property(nonatomic)            CGFloat         segmentLineWidth;      //  linewidth > 0，底部高亮线
@property(nonatomic, strong)    UIColor         *segmentHighlightColor;
@property(nonatomic, strong)    UIColor         *segmentBorderColor;
@property(nonatomic)            CGFloat         segmentBorderWidth;
@property(nonatomic, strong)    UIColor         *segmentTitleColor;
@property(nonatomic, strong)    UIFont          *segmentTitleFont;
@property(nonatomic, strong)    UIFont          *segmentHighlightTitleFont;
@property(nonatomic, strong)    NSArray         *viewControllers;
@property(nonatomic, assign)    BOOL            hasDistance; // 是否有间距
@property (nonatomic, assign) BOOL segmentControlIsNoSpacing; // 标题距离顶部是否又间距
@property (nonatomic, assign) BOOL canScrollow; // 是否能联动
@property (nonatomic, assign) BOOL isHiddenLineView; // 是否隐藏分隔线

#pragma mark - 配合使用
@property (nonatomic, assign) ControllerShowType controllerShowType;
@property (nonatomic, assign) BOOL roll;
@property (strong, nonatomic) UIButton * leftBarItemButton;
@property (strong, nonatomic) UIButton * rightBarItemButton;
@property (nonatomic, strong) UIButton * otherRightBarItemButton;

@property (nonatomic, copy)     SegmentControlSelectedIndex block;

- (void)segmentControlSelectedIndex:(SegmentControlSelectedIndex)block;

@end
